package com.kullachi.jmx.listener;

import java.util.logging.Logger;

import javax.management.MBeanServerNotification;
import javax.management.Notification;
import javax.management.NotificationListener;

/**
 * @author Sundar
 *
 */
public class ClientListener implements NotificationListener{
	Logger LOG = Logger.getLogger(ClientListener.class.getName());
	
	
	/* (non-Javadoc)
	 * @see javax.management.NotificationListener#handleNotification(javax.management.Notification, java.lang.Object)
	 */
	public void handleNotification(Notification notification,
            Object handback) {
		LOG.info("Received notification:");
		if(notification.getType().equals("JMX.mbean.registered")){
        	MBeanServerNotification beanNotification = (MBeanServerNotification)notification;
        	
		}else if(notification.getType().equals("JMX.mbean.unregistered")){
			MBeanServerNotification beanNotification = (MBeanServerNotification)notification;
			
		}
		
	}

}
